package org.dromara.demo.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.dromara.common.mybatis.annotation.DataColumn;
import org.dromara.common.mybatis.annotation.DataPermission;
import org.dromara.demo.domain.JsExample;
import org.dromara.demo.domain.JsSuite;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.demo.domain.vo.JsSuiteVo;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * 用例执行Mapper接口
 *
 * @author zhu
 * @date 2024-12-31
 */
public interface JsSuiteMapper extends BaseMapperPlus<JsSuite, JsSuiteVo> {
    @Override
    @DataPermission({
        @DataColumn(key = "deptName", value = "create_dept"),
        @DataColumn(key = "userName", value = "create_by")
    })
    List<JsSuite> selectList(IPage<JsSuite> page, @Param("ew") Wrapper<JsSuite> queryWrapper);
    @Override
    @DataPermission(value = {
        @DataColumn(key = "deptName", value = "create_dept"),
        @DataColumn(key = "userName", value = "create_by")
    }, joinStr = "AND")
    List<JsSuite> selectByIds(@Param(Constants.COLL) Collection<? extends Serializable> idList);

    @Override
    @DataPermission({
        @DataColumn(key = "deptName", value = "create_dept"),
        @DataColumn(key = "userName", value = "create_by")
    })
    int updateById(@Param("et") JsSuite entity);
}
